package com.fundedu;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

@SuppressWarnings("serial")
public class ContactUsServlet extends HttpServlet{
	private static final Logger log = Logger.getLogger(FundEduSignServlet.class.getName());

    public void doPost(HttpServletRequest req, HttpServletResponse resp)
                throws IOException {
        UserService userService = UserServiceFactory.getUserService();
        User user = userService.getCurrentUser();

        if (user != null) {
            log.info("111 Greeting posted by user " + user.getNickname());
        } else {
            log.info("1111 Greeting posted anonymously: ");
        }
        
        resp.sendRedirect("/fundedu/contactUs/contactUs.jsp");
    }
}
